package cn.wdcode.demo.web;

        import org.springframework.stereotype.Controller;
        import org.springframework.web.bind.annotation.RequestMapping;
        import org.springframework.web.servlet.ModelAndView;

/**
 * Created by wudi on 2016/12/20.
 */
@Controller
@RequestMapping("/")
public class IndexController {

    @RequestMapping(value = {"", "/", "index"})
    public ModelAndView index() {
        ModelAndView mv = new ModelAndView("index");
        mv.addObject("author", new String("wudi"));
        return mv;
//        modelAndView.setViewName("index");
//        modelAndView.addObject("author","wudi");
//
//        return  modelAndView;
    }
}
